#pragma once
#include<iostream>

using std::cin;
using std::cout;
using std::endl;
using std::pair;

template<class T>
struct HuffmanNode
{
	typedef HuffmanNode<T> Node;
	typedef HuffmanNode<T>* pNode;
	size_t _weight;
	T _data;
	pNode _left;
	pNode _right;
	pNode _parent;

	HuffmanNode(size_t weight, T data = T(), 
		pNode left = nullptr,pNode right = nullptr, pNode parent = nullptr)
		:_weight(weight), _data(data), _left(left), _right(right), _parent(parent) {}
};

template<class T>
class HuffmanTree
{
	typedef HuffmanNode<T> Node;
	typedef HuffmanNode<T> pNode;
public:
	HuffmanTree() :_root(nullptr) {}
	void insert(pNode first, size_t count)
	{

	}

private:
	pNode _root;
};